package com.shujia.scala

object Demo17Fun4 {
  def main(args: Array[String]): Unit = {


    /**
      * 参数和返回值都是一个函数
      *
      */
    def fun1(f: String => String): String => String = {
      f
    }

    //val f: (String => String) => String => String = fun1

    val f3: String => String = fun1((s: String) => s)

    val str: String = f3("shujia")

    println(str)


  }

}
